cmake_minimum_required(VERSION 3.10.0)
project(cai VERSION 0.1.0 LANGUAGES C)

# 查找CURL库
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})

add_library(cai STATIC lib/cai.c sds/sds.c cjson/cJSON.c)
target_include_directories(cai PRIVATE lib sds cjson)
target_link_libraries(cai PRIVATE ${CURL_LIBRARIES})

add_executable(test main.c)
target_include_directories(test PRIVATE lib)
target_link_libraries(test PRIVATE cai)
